package com.vast.admin.api.cietac.task;

import com.vast.admin.service.ArbitrationCaseService;
import com.vast.admin.service.IArbitrationProjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.Scheduled;

/**
 * 贸仲定时同步任务
 */
@Configuration
public class CietacSyncTask {

    @Autowired
    private ArbitrationCaseService arbitrationCaseService;

    @Autowired
    private IArbitrationProjectService arbitrationProjectService;


    /**
     * 定时同步任务 每五分钟执行一次
     */
    @Scheduled(fixedRate =  60 * 1000)
    public void excute() {
        arbitrationCaseService.syncStatus();
        arbitrationProjectService.syncStatus();
    }

}
